Estoy tratando de codificar un bot de música, y codifiqué un sistema que entiende si el canal para unirse es válido o no, pero cuando ingreso un canal no válido, el bot falla y me da este error: Invalid form body, channel_id: Value "args[0]" is not snowflake . ¿Que puedo hacer? Código:
module.exports = { name: "join", aliases: ["j", "move"], async execute (client, message, args, Discord) { let voiceChannel = message.member.voice.channel; if (args[0]) { voiceChannel = await client.channels.fetch(args[0]); if (!Discord.Constants.VoiceBasedChannelTypes.includes(voiceChannel?.type)) { return message.reply(`Sadly, ${args[0]} is kinda not a valid voice channel :(`); } } if (!voiceChannel) return message.reply("You have to be in a voice channel you dummy! 😳👉👈"); client.distube.voices.join(voiceChannel); } }